package qmsz.api.service.impl;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import qmsz.api.dao.QMItemDAO;
import qmsz.api.domain.QMItem;
import qmsz.api.service.QMItemService;

@Service
public class QMItemServiceImpl implements QMItemService {
	
	private static final Logger logger = Logger.getLogger(QMItemServiceImpl.class);
	
	@Autowired
	private QMItemDAO qmitemDAO;
	
	@Override
	public QMItem findItemByCode(String code) {
		QMItem value = null;
		try {
			value = qmitemDAO.findItemByCode(code);
		} catch (Exception e) {
			logger.error("query error", e);
			value = null;
		}
		return value;
	}

}
